# Contributor: Galen Abell <galen@galenabell.com>
# Maintainer: Galen Abell <galen@galenabell.com>
pkgname=dino
pkgver=0.1.0
pkgrel=2
pkgdesc="Modern Jabber/XMPP client"
url="https://dino.im"
arch="all"
license="GPL-3.0-only"
makedepends="
	glib-dev
	glib-networking
	gtk+3.0-dev
	gpgme-dev
	libgee-dev
	libsignal-protocol-c-dev
	libgcrypt-dev
	libsoup-dev
	sqlite-dev
	libqrencode-dev
	cmake
	vala
	ninja
"
subpackages="$pkgname-lang"
source="
	https://github.com/dino/dino/releases/download/v$pkgver/dino-$pkgver.tar.gz
	bump-signal-version.patch
	"

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--with-tests
	make
}

check() {
	build/xmpp-vala-test
	build/signal-protocol-vala-test
}

package() {
	make DESTDIR="$pkgdir" install
}
sha512sums="b63bf87dbf7f728f038f22d0dba34770a06d7eb1be2ec249293ff876e16c151165add895ff3cb20a3216c3581d20e10634d454ee8b024b895012efb34f9d7de8  dino-0.1.0.tar.gz
01f26d8f130ba25aaf0dcc58fd4629c168435a833efe6bb95269b73992922f578364bf71ee141114a1a6ab677ee71d2a22426c46eb2b5ca4a0b5a6ce124e2e12  bump-signal-version.patch"
